/*
 * Copyright (c) 2017-2021, Lindenis Tech. Ltd.
 * All rights reserved.
 *
 * File:
 *
 * Description:
 *
 * Author:
 *      xiaoshujun@lindeni.com
 *
 * Create Date:
 *      2021/10/19
 *
 * History:
 *
 */

#ifndef __LIND_TUNNEL_IOCTRL_DEFINE_H__
#define __LIND_TUNNEL_IOCTRL_DEFINE_H__

#ifdef __cplusplus
extern "C" {
#endif

typedef enum {
    SAMPLE_IOCTRL_INVALID              = 0xFFFFFFFF,

    SAMPLE_IOCTRL_DEVICE_EVENT         = 0x0001,   // device to client

    SAMPLE_IOCTRL_ADD_REQ              = 0x1000,
    SAMPLE_IOCTRL_ADD_RESP             = 0x1001,
    SAMPLE_IOCTRL_SET_PARAMS_REQ       = 0x1002,
    SAMPLE_IOCTRL_SET_PARAMS_RESP      = 0x1003,
    SAMPLE_IOCTRL_GET_PARAMS_REQ       = 0x1004,
    SAMPLE_IOCTRL_GET_PARAMS_RESP      = 0x1005,

} SAMPLE_IOCTRL_DEF_e;

/**
 * SAMPLE_IOCTRL_DEVICE_EVENT       = 0x1000,
 */
typedef struct
{
    int32_t     type;   // refer to LDT_EVENT_e
    int8_t      reserved[8];
} sample_ldt_ioctrl_event_t;

/**
 * LDT_IOCTRL_ADD_REQ              = 0x1000,
 * LDT_IOCTRL_ADD_RESP             = 0x1001,
 */
typedef struct
{
    int32_t     a;
    int32_t     b;
} sample_ldt_ioctrl_add_request_t;

typedef struct
{
    int32_t     result;
} sample_ldt_ioctrl_add_response_t;

/**
 * LDT_IOCTRL_SET_PARAMS_REQ       = 0x1002,
 * LDT_IOCTRL_SET_PARAMS_RESP      = 0x1003,
 * LDT_IOCTRL_GET_PARAMS_REQ       = 0x1004,
 * LDT_IOCTRL_GET_PARAMS_RESP      = 0x1005,
 */
typedef struct
{
    char        str[32];
    int32_t     ival;
    float       fval;
} sample_ldt_ioctrl_set_params_request_t, sample_ldt_ioctrl_get_params_response_t;

typedef struct
{
    int32_t     result;         // 0: sucess, -1: failed
    int8_t      reserved[4];
} sample_ldt_ioctrl_set_params_response_t;

typedef struct
{
    int8_t      reserved[4];    // not uesed
} sample_ldt_ioctrl_get_params_request_t;

#ifdef __cplusplus
}
#endif

#endif  // __LIND_TUNNEL_IOCTRL_DEFINE_H__



